# -*- coding: utf-8 -*-
import logging
from command import Command
from translate import Translate

if __name__ == "__main__" :
    import sys
    argList = sys.argv
    logging.basicConfig(level=logging.INFO)
    cm = Command()
    import os.path
    argList.pop(0)
    logging.debug("========== arg list is " + ''.join(argList) + " ==========")
    if cm.parse(argList):
        logging.debug(cm.getClassPath())
        logging.debug(cm.getFileName())

        m = Translate()
        m.setClassPath(cm.getClassPath())
        m.setFileName(cm.getFileName())
        m.setOutPath(cm.getOutPath())
        m.translate()
    else:
        print u"命令输入错误"

